package org.flowable.pz.service;

import org.flowable.pz.entity.dto.FlowableDefinitionDto;
import org.flowable.pz.entity.vo.FlowableXmlVo;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

public interface FlowableDefinition {

    /**
     * 部署流程定义
     * */
    void deployment(MultipartFile file);

    /**
     * 部署流程定义
     * */
    void deployment(@Valid FlowableXmlVo flowXmlVo);

    /**
     * 查询已部署的流程定义
     * */
    List<FlowableDefinitionDto> definitionList(String name, String type);

    /**
     * 流程挂起、激活
     * */
    void suspend(@NotNull(message = "流程定义 id 参数 definitionId 不能为空！") String definitionId);

}
